import { sm2 } from 'sm-crypto';

const publicKey = '04083fa642721647a8ce32ff9933ca68b31be1e2f6bd9a3f606232e2b564021a8e365be3c815adc8e2a9ddd028203c4b2cdc1dc753a0113532eb774e824a861b59'

const cipherMode = 1

export function pencode(data) {
    return sm2.doEncrypt(data, publicKey, cipherMode) 
}